
{{ define "admin/role/index.html" }}
{{template "admin/common/page_header.html"}}

<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <header class="card-header"><div class="card-title">角色管理</div></header>
                <div class="card-body">
                    <h6>角色列表</h6>
                    <table class="table table-hover table-dark">
                        <thead>
                            <tr class="th">
                                <th>角色名称</th>
                                <th>角色名称</th>
                                <th>角色状态</th>
                                <th class="text-center">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        {{range $key,$value := .roleList}}
                            <tr>
                                <td>{{$value.Title}}</td>
                                <td>{{$value.Description}}</td>

                                <td>
                                    {{if eq $value.Status 1}}
                                        <img class="chStatus" data-id="{{$value.Id}}" data-table="role" data-field="status" src="/static/admin/images/yes.gif" />
                                    {{else}}
                                        <img class="chStatus"  data-id="{{$value.Id}}" data-table="role" data-field="status" src="/static/admin/images/no.gif" />
                                    {{end}}
                                </td>

                                <td class="text-center">
                                    <a href="/admin/role/auth?id={{$value.Id}}">授权</a>
                                    <a href="/admin/role/edit?id={{$value.Id}}">修改</a>
                                    <a class="delete" href="/admin/role/delete?id={{$value.Id}}">删除</a>
                                </td>
                            </tr>
                        {{end}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

{{end}}